System and method for real-time depth modification of stereo images of a virtual reality environment

ABSTRACT

Enables real-time depth modifications to stereo images of a 3D virtual reality environment locally and for example without iterative workflow involving region designers or depth artists that includes re-rendering these images from the original 3D model. Embodiments generate a spherical translation map from the 3D model of the virtual environment; this spherical translation map is a function of the pixel shifts between left and right stereo images for each point of the sphere surrounding the viewer of the virtual environment. Modifications may be made directly to the spherical translation map, and applied directly to the stereo images, without requiring re-rendering of the scene from the complete 3D model. This process enables depth modifications to be viewed in real-time, greatly improving the efficiency of the 3D model creation, review, and update cycle.

This application is a continuation in part of U.S. Utility patent application Ser. No. 14/709,327, filed 11 May 2015, which is a continuation in part of U.S. Utility patent application Ser. No. 13/874,625, filed 1 May 2013, the specifications of which are hereby incorporated herein by reference.

This application is also a continuation in part of U.S. Utility patent application Ser. No. 13/895,979, filed 16 May 2013, which is a continuation in part of U.S. Utility patent application Ser. No. 13/366,899, filed 6 Feb. 2012, which is a continuation in part of U.S. Utility patent application Ser. No. 13/029,862, filed 17 Feb. 2011, the specifications of which are hereby incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

One or more embodiments of the invention are related to the field of image analysis and image enhancement, and computer graphics processing of two-dimensional (2D) images into three-dimensional (3D) stereoscopic images. More particularly, but not by way of limitation, one or more embodiments of the invention enable a system and method for real-time depth modification of stereo images of a virtual reality environment, for example without alteration of masks used in the initial depth augmentation process. Specifically, depth may be quickly adjusted locally and for example without the time consuming iterative workflow typical in depth conversion processes that generally requires different workgroups to adjust regions or depth in masks and send changes back for review.

2. Description of the Related Art

3D viewing is based on stereographic vision, with different viewpoints from one or more images provided to the left and right eyes to provide the illusion of depth. Many techniques are known in the art to provide 3D viewing. For example, specialized glasses may be utilized for viewing 3D images, such as glasses with color filters, polarized lenses, or anamorphic lenses. Some 3D viewing methods use separate screens for left eye and right eye images, or project images directly onto the left eye and right eye.

Virtual reality environments typically are computer-generated environments that simulate user presence in either real world or computer-generated worlds. The systems utilized to display the virtual reality environment typically include a stereoscopic display for 3D viewing and generally instrument a viewer with one or more sensors, in order to detect and respond to the position, orientation, and movements of the viewer. Based on these values, the virtual reality environment generates images to provide an immersive experience. The immersive experience may also include other outputs such as sound or vibration. Images may be projected onto screens, or provided using specialized glasses worn by the user.

The vast majority of images and films historically have been captured in 2D. These images or movies are not readily viewed in 3D without some type of conversion of the 2D images for stereoscopic display. Thus 2D images are not generally utilized to provide realistic 3D stereoscopic virtual reality environments. Although it is possible to capture 3D images from stereoscopic cameras, these cameras, especially for capturing 3D movies, are generally expensive and/or cumbersome 3D cameras. Specifically, there are many limitations with current 3D camera systems including prices and precision of alignment and minimum distance to a subject to be filmed for example.

The primary challenge with creating a 3D virtual reality environment is the complexity of generating the necessary stereo images for all possible positions and orientations of the viewer. These stereo images must be generated dynamically in approximately real-time as the viewer moves through the virtual reality environment. This requirement distinguishes 3D virtual reality from the process of generating 3D movies from 2D images as the location of the viewer is essentially fixed at the location of the camera.

Approaches in the existing art for 3D virtual reality rely on a detailed three-dimensional model of the virtual environment. Using the 3D model, left and right eye images can be generated by projecting the scene onto separate viewing planes for each eye. Computer-generated environments that are originally modeled in 3D can therefore be viewed in 3D virtual reality. However, creating these models can be extremely time-consuming. The complexity of creating a full 3D model is particularly high when it is desired to create a photo-realistic 3D model of an actual scene. This modeling effort requires that all shapes be defined and positioning in 3D in great detail, and that all colors and textures of the objects be set to match their counterparts in the real scene. Existing techniques for creating 3D virtual environments are therefore complex and time-consuming. They require extensive efforts from graphic artists and 3D modelers to generate the necessary realistic 3D models. Hence there is a need for a method for creating 3D virtual reality from 2D images.

The process of creating a 3D virtual reality is typically iterative. 2D images and possibly computer-generated elements are modeled in 3D space using depth assignments. Stereoscopic 3D images are then rendered from the 3D models and reviewed for accuracy and artistic effects. Typically, these reviews identify adjustments that are needed to the 3D models. These adjustments are applied, and the revised model is re-rendered for a subsequent review. This process may repeat several times. It is time consuming because the modifications to the 3D models and the rendering of images from these 3D models are labor intensive and computationally intensive and may be impossible in real-time. There are no known methods that provide rapid depth update and review cycles for virtual reality models. There are no known methods that allow editors to modify depth and immediately observe the effect of these depth changes on the stereoscopic images. Hence there is a need for a method for real-time depth modification of stereo images for a virtual reality environment.

BRIEF SUMMARY OF THE INVENTION

Embodiments of the invention enable a method for real-time depth modification of stereo images for a virtual reality environment. A set of 2D images may be obtained from an environment, which may for example be a real physical environment such as a room, a computer-generated environment, or a mix of physical and computer-generated elements. 2D images may be captured using a camera aimed at various angles to form a panoramic collection of images covering a desired part of a scene. In some embodiments the collection of images may cover an entire sphere, providing 360° viewing in all directions (including left-to-right and up and down). Embodiments of the invention enable converting these 2D images into a 3D virtual reality experience. A viewer in the virtual reality environment may be able to view the environment from various locations and orientations, and perceive three-dimensional depth reflecting the physical or modeled characteristics of the captured scene.

In one or more embodiments of the invention, subsets of the 2D images are first stitched together, using for example common features or overlapping pixels. The integrated, stitched images may then be projected onto a spherical surface to form a complete 360-degree view of the scene (or a desired portion thereof) in any direction (left to right as well as up and down). The spherical surface provides a complete spherical view of the scene, but this view is still two-dimensional since it lacks any depth information. Embodiments of the invention enable addition of depth information to the spherical display. In one or more embodiments, the spherical surface image is unwrapped onto a plane. This unwrapped image may be divided into regions to assist in generating depth information. Depth information is generated for the points of the regions. Depth may be applied to the regions manually, via external depth information sources, calculated based on any portion of the underlying image data including hue, luminance, saturation or any other image feature or any combination of acceptance of manual depth or external depth or calculation of depth. Depth information may comprise for example, without limitation, depth maps, bump maps, parallax maps, U maps, UV maps, disparity maps, ST maps, point clouds, z maps, offset maps, displacement maps, or more generally any information that may provide a three-dimensional shape or three-dimensional appearance to an image. Using the spherical surface image and the assigned depth information for the points of the regions, 3D stereoscopic images may be generated for a viewer in a 3D virtual reality environment. The depth information determines the amount of offset for each point between the left eye and right eye images, which provides a three-dimensional viewing experience.

Different embodiments of the invention may use various methods for generating the stereo images using the depth information. In one or more embodiments, the depth information may be projected onto a sphere, yielding spherical depth information that provides depth for all or a portion of the points on the sphere. Spherical depth information may comprise for example, without limitation, spherical depth maps, spherical bump maps, spherical parallax maps, spherical U maps, spherical UV maps, spherical disparity maps, spherical ST maps, spherical point clouds, spherical z maps, spherical offset maps, spherical displacement maps, or more generally any information that may provide a three-dimensional shape or three-dimensional appearance to a spherical surface. The unwrapped plane image is also projected onto a spherical surface to form the spherical image. Left and right eye images may then be generated using the spherical depth information. For example, if the depth information is a depth map that provides a z-value for each pixel in one or more 2D images, the spherical depth information may be a spherical depth map that provides a z-value for each point on the sphere. In this case left and right images may be formed by projecting each image point from its spherical depth position onto left and right image planes. The position and orientation of the left and right image planes may depend on the position and orientation of the viewer in the virtual reality environment. Thus the stereo images seen by the viewer will change as the viewer looks around the virtual reality environment in different directions. The projections from the spherical depth map points onto the left and right image planes may for example use standard 3D to 2D projections to a plane using a different focal point for each eye.

In other embodiments of the invention a different method may be used to generate the stereographic images. This method first generates a stereo image in 2D using the unwrapped plane image and the plane depth information. The left and right images are then projected onto spheres, with a separate left sphere and right sphere for the left and right images. Based on the position and orientation of the viewer in the virtual reality environment, left and right image planes and eye positions are calculated, the left sphere is projected onto the left image plane, and the right sphere is projected onto the right image plane.

In one or more embodiments, the regions of the unwrapped plane image may be used to assist in creating the depth information. One or more regions may be mapped onto flat or curved surfaces, and these surfaces may be positioned and oriented in three-dimensional space. In some embodiments constraints may be applied manually or automatically to reflect continuous or flexible boundaries between region positions in space. Depth information may be generated directly from the region positions and orientations in three-dimensional space by relating the depth to the distance of each point from a specified viewpoint.

In some embodiments it may be desirable to modify the 2D images from the scene in order to create a 3D virtual reality environment. For example, objects may be captured in the 2D images that should not appear in the virtual reality environment; conversely it may be desirable to insert additional objects that were not present in the 2D images. Operators may edit the original images, the unwrapped 2D image, the spherical images, or combinations of these to achieve the desired effects. Removing an object from the environment consists of replacing the pixels of the removed object with a suitable fill, which may be obtained automatically from surrounding regions. Adding an object consists of inserting an image and applying the appropriate depth information to the region or regions of the added image. Inserted images may be obtained from real objects or they may be computer generated, or they may be a combination of real images and computer generated images. Objects in the 2D images may also be extended in some embodiments to fill areas that were not captured in the original images, or that are in areas where undesired objects have been removed. Some embodiments may add objects in multiple layers at multiple depths, providing for automatic gap filling when the viewpoint of a viewer in the 3D virtual reality environment changes to reveal areas behind the original objects in the scene.

One or more embodiments enable a system and method for rapidly and efficiently updating stereoscopic images to reflect changes in the depths assigned to objects in the scene. Multiple, iterative depth modifications may be needed in some situations. Artists, editors, producers, and quality control teams may review left and right viewpoint images generated from the virtual environment, and may determine in some cases that the assigned depths are not optimal. One or more embodiments provide a method for applying depth changes without re-rendering the entire virtual reality scene to create new left and right images from the 3D model of the virtual environment. In one or more embodiments, a 3D model of a virtual reality environment is created or obtained, for example using the image stitching techniques described above. One or more embodiments may generate a spherical translation map from this 3D model that may be used to apply depth updates without re-rendering. A spherical translation map may for example assign translation values to points on the sphere, where the translation value for a point is a function of the distance between the viewer (at the center of the sphere) and the closest object in the scene along the ray between the viewer and that point of the sphere. A translation map may be for example, without limitation, a depth map, a parallax map, a disparity map, a displacement map, a U map, or a UV map. For example, a parallax map contains left and right pixel offsets directly. A depth map contains depth values that are inversely proportional to pixel offsets. Any map that can be used to determine pixel offsets between left and right viewpoint images may be used as a spherical translation map.

In one or more embodiments, an initial stereoscopic (left and right) pair of images may be rendered from the 3D model, along with the spherical translation map. Subsequent modifications to the depth of selected objects may be made by directly editing and modifying the spherical translation map, rather than modifying and re-rendering the 3D model. This process provides a rapid and efficient method for modifying depth after left and right images are created.

Any left and right images from any user viewpoint may be used to review the 3D model for the virtual reality environment. For example, in one or more embodiments reviewers may use one or more planar image projections from one or more directions. In one or more embodiments reviewers may use panoramic images generated from the 3D virtual environment to review and possibly modify the depth assignments. These panoramic images may for example include a full 360-degree horizontal field of view and a full 180-degree vertical field of view, or they may in other cases be partial panoramas covering only a subset of the user's entire field of view. Updates to left and right viewpoint images from spherical translation map modifications may be made to any stereoscopic images generated from the scene, including both planar projections and panoramic images.

One or more embodiments may apply the above methods for real-time, rapid update of stereo images using spherical translation maps to any 3D model of a virtual reality environment. A 3D model of a virtual reality environment may for example be created from camera images of a real scene, from computer-generated elements, or from combinations of real images and computer-generated elements. A 3D model may be created by assigning depth to computer-generated elements or to geometrical surfaces onto which images are projected. Embodiments may create spherical translation maps from the 3D model and use these spherical translation maps to modify stereoscopic images without re-rendering.

BRIEF DESCRIPTION OF THE DRAWINGS

The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.

The above and other aspects, features and advantages of the invention will be more apparent from the following more particular description thereof, presented in conjunction with the following drawings wherein:

FIG. 1 illustrates a flowchart of at least one embodiment of a method for creating 3D virtual reality from 2D images.

FIG. 1A illustrates a flowchart of at least one embodiment of a method for generating 3D virtual reality in which stereo images are generated using spherical depth information that positions 2D pixels relative to the surface of a sphere in 3D space.

FIG. 1B illustrates a flowchart of at least one embodiment of a method for generating 3D virtual reality in which stereo images are generated first in 2D, then projected onto separate left and right spheres, and finally converted to stereo in a 3D viewing environment.

FIG. 2 illustrates an embodiment of a step to capture a series of 2D images of an environment by aiming a camera in varying horizontal and vertical angles.

FIG. 3 illustrates an embodiment of a step to stitch sets 2D images together into integrated 2D images; in this illustration four 2D images from FIG. 2 are stitched together into an integrated image by aligning matched features.

FIG. 4 illustrates an embodiment of a step to project integrated 2D images onto a spherical surface.

FIG. 5 illustrates an example of a spherical surface image that results from projecting 2D images onto a sphere.

FIG. 6 illustrates an example of a spherical surface image that is unwrapped into a panoramic 2D image. (Note that this scene is different from the scene shown in FIG. 5.)

FIG. 7 illustrates an embodiment of a step of dividing the unwrapped image of FIG. 6 into multiple regions; each region is color-coded with a color mask to identify its boundaries.

FIG. 8 illustrates an embodiment of a step of assigning a depth map to the points of each of the regions of FIG. 7; darker points are closer to the viewer.

FIG. 9 illustrates an anaglyph 3D stereoscopic view of the scene depicted in FIG. 7 with the depth map of FIG. 8.

FIG. 10 illustrates an embodiment of a step of creating a spherical depth map from a 2D depth map as outlined in the flowchart of FIG. 1A.

FIG. 11 illustrates an embodiment of a step of generating left and right stereo 2D views from a spherical depth map.

FIG. 12 illustrates an embodiment of a step of generating separate left and right spherical surface images, which are subsequently used to create stereo views, using a 2D image and a 2D depth map, as outlined in the flowchart of FIG. 1B.

FIG. 13 illustrates an embodiment of a division of a 2D image of a human figure into regions, with each region assigned a distinct color for identification.

FIG. 14 illustrates an embodiment of positioning and orienting the regions of FIG. 13 in 3D space in order to generate depth information.

FIG. 15 illustrates an embodiment of a depth map generated from the 3D model of FIG. 14.

FIG. 16 illustrates the 2D images captured from a scene as shown in FIG. 2, highlighting features where modifications are desired to the images in order to form the 3D virtual reality environment.

FIG. 17 illustrates an unwrapped image formed from the 2D images of FIG. 16 with the desired modifications made to the image.

FIG. 18 illustrates an extension of flowchart of FIG. 1, which shows an iterative cycle of reviewing images, updating a 3D model, and re-rendering a scene.

FIG. 19 illustrates an embodiment of the method that shortens the iterative review and update cycle shown in FIG. 18 using modifications to a spherical translation map that result in immediate changes to the stereo images.

FIG. 20 illustrates a graphical user interface for an embodiment of the method, which provides controls for an editor to modify the translations of selected objects in a virtual reality scene.

FIG. 21 shows an illustrative panoramic image in anaglyph stereo format; the top image is modified by the edits specified in FIG. 20, resulting in the bottom image.

FIG. 22 shows a different edit for the translations of objects in the graphical user interface shown in FIG. 20.

FIG. 23 shows another illustrative panoramic image in anaglyph stereo format; the top image is modified by the edits specified in FIG. 22, resulting in the bottom image.

DETAILED DESCRIPTION OF THE INVENTION

A method for real-time depth modification of stereo images of a virtual reality environment will now be described. In the following exemplary description numerous specific details are set forth in order to provide a more thorough understanding of embodiments of the invention. It will be apparent, however, to an artisan of ordinary skill that the present invention may be practiced without incorporating all aspects of the specific details described herein. In other instances, specific features, quantities, or measurements well known to those of ordinary skill in the art have not been described in detail so as not to obscure the invention. Readers should note that although examples of the invention are set forth herein, the claims, and the full scope of any equivalents, are what define the metes and bounds of the invention.

FIG. 1 illustrates a flowchart of at least one embodiment of a method for creating 3D virtual reality from 2D images, including exemplary components that may be utilized therewith. In step 101, multiple 2D images are obtained of environment 100, yielding a set of 2D images 102. Environment 100 may for example be a room, an office, a building, a floor, a house, a factory, a landscape, or any other scene or combination of scenes for which a virtual reality experience is to be created. This environment may be real, or it may itself be virtual or computer generated, or it may be a mix of real elements and computer generated elements. The step 101 of obtaining 2D images may use for example one or more cameras—including single image and video cameras—or any other sensor or sensors that capture non-visible frequencies such as radar or lidar. For computer-generated images the cameras may be virtual and the 2D images may be viewing projections of a 2D or 3D computer generated scene. As will be discussed, the depth information associated with an image may be accepted by the system, for example by providing user interface elements for users to draw masks on regions or user interface elements to set parameters for auto-generation of masks for regions of luminance, color or other image parameters. The system thus enables the user to assign depth information to regions in the 2D image or alternatively or in combination, obtain depth via radar or lidar to generate a depth map for example.

Step 103 stitches together subsets of the 2D images 102 into integrated 2D images 104. The stitching process combines and aligns 2D images and eliminates overlap among the 2D images. Stitching step 103 may combine all 2D images into a single panorama, or it may combine subsets of 2D images into various panoramic images that cover portions of the entire environment 100. Different embodiments may employ different stitching strategies. Integrated images may cover all or any portion of the sphere of view directions visible from one or more cameras.

Any known technique for stitching together multiple images into a composite integrated image may be utilized. Stitching may be done manually, automatically, or with a hybrid manual-automatic procedure where one or more operators make rough stitching and software completes the smooth stitch. Embodiments of the invention may utilize any or all of these approaches.

Automated stitching typically aligns the overlap regions of multiple images using a best-fit based on feature differences or on pixel differences. Feature-based methods perform a feature extraction pass first on the images, and then find the location of similar features in multiple images for alignment. See for example: M. Brown and D. Lowe (2007). Automatic Panoramic Image Stitching using Invariant Features. International Journal of Computer Vision, 74(1). Pixel-based methods minimize the pixel differences between images in their regions of overlap. See for example: Suen et al. (2007). Photographic stitching with optimized object and color matching based on image derivatives. Optics Express, 15(12).

In addition, several existing software packages perform stitching using either of both of these methods; illustrative examples include commonly available photo processing software. Embodiments of the invention may use any of the methods known in the art or available in software packages to perform the image stitching step 103.

In step 105, the integrated 2D images 104 are projected onto a spherical surface. In some embodiments, these projections may use a measured or estimated position and orientation of the camera or cameras used in step 101 to capture the 2D images that formed the integrated 2D images. The output of step 105 is a spherical surface image 106. A spherical surface represents an approximate b 3D model of the location of the objects in the environment 100; this approximate model places all points on the objects equidistant from the center of the sphere. Adjustments to this approximate 3D model may be made in subsequent steps using depth information to form more realistic models of the environment.

In step 107 the spherical surface image 106 is “unwrapped” onto an unwrapped plane image 108. This unwrapping process may use any of the spherical-to-plane projection mappings that are known.

In step 109, the unwrapped plane image 108 is divided into regions 110. This step may be done by one or more operators, or it may be assisted by software. For example, software may tentatively generate region boundaries based on shapes, colors, or textures of objects in the unwrapped image 108.

In step 111, depth information 112 is assigned to the points of the regions 110. The depth information is used in subsequent steps to generate the 3D stereo images for a virtual reality experience. Depth information reflects how far away each point of each region is from a viewer. Many techniques for defining and using depth information are known in the art; any of these techniques may be used for generating or using the depth information 112. For example, without limitation, depth information may comprise depth maps, bump maps, parallax maps, U maps, UV maps, disparity maps, ST maps, point clouds, z maps, offset maps, displacement maps, or more generally any information that may provide a three-dimensional shape or three-dimensional appearance to an image. Assigning of depth information may be done by one or more operators. In some embodiments software may be used to assist the step 111 of assigning depth information. For example, operators may be able to rotate or reposition entire regions in a 3D scene, and depth information may be generated automatically for the regions based on this 3D positioning. Software may also be used to generate curved regions or to blend depth information at boundaries between regions.

In step 114, the depth information 112 and the unwrapped image 108 are used as inputs to generate stereo images for a viewer at viewer position and orientation 113. The stereo images consist of a left eye image 115 and a right eye image 116. Any of the commonly available stereo 3D vision technologies, such as special viewing glasses used to see 3D movies, may be used by the viewer to view the virtual reality environment in 3D using these stereo images. For example, viewers may use glasses with different colored left and right lenses, or glasses with different polarization in left and right lenses, or glasses with LCD lenses that alternately show left and right images.

FIGS. 2-9 illustrate exemplary embodiments of the steps of FIG. 1 in greater detail, while FIGS. 1A and 1B are discussed after FIGS. 2-9.

FIG. 2 illustrates an embodiment of step 101—obtaining 2D images of environment 100. In this example the environment 100 is a room with a table 203 approximately in the center of the room. A series of 2D images 201 is obtained of the room using a camera aimed at different angles. In this example the 2D images 201 are captured in five rows 202 a, 202 b, 202 c, 202 d and 202 e, where each row corresponds to a vertical angle for the camera. Within each row the camera is aimed at 12 different horizontal angles, with an increment 204 of approximately 30° between each horizontal angle, forming a complete 360° panorama of the scene 100. Other embodiments of the invention may use different techniques and angle increments for capturing a series of 2D images to cover a desired portion of an environment 100.

FIG. 3 illustrates an embodiment of step 103—stitching together 2D images into integrated images. Image 301, 302, 303, and 304 are individual 2D images from row 202 e of FIG. 2. A manual or automated scan for shared features identifies, for example, the back of the chair which appears as 305 a in image 301 and as 305 b in image 302, and the right front table leg which appears as 306 a in image 303 and as 306 b in image 304. Aligning the images on these (and other) shared features produces the rough stitch 307. Different embodiments of the invention may use various grouping strategies for stitching together integrated images in step 103. For example, all of the images in a row (such as row 202 e of FIG. 2) may be stitched together, or portions of rows (as shown here in FIG. 3) may be stitched together. Stitching may also be done vertically (in columns) in addition to or instead of horizontally (in rows), or with mixed approaches to combine similar images.

FIG. 4 illustrates an embodiment of step 105—projecting the integrated 2D images onto spherical surface 403. Many techniques are known in the art for projecting plane images onto a sphere and for the reverse process of projecting spherical images onto a plane. These techniques are similar to known techniques of cartography, which generate 2D map images of a spherical surface or a portion thereof. For example, maps may use projections such as Mercator, Lambert cylindrical, Azimuthal, Orthographic, and many others. Projecting 2D plane images onto a sphere amounts to reversing the normal map projections that project a sphere onto plane images.

Different embodiments of the invention may employ different projection techniques. FIG. 4 illustrates a spherical projection that may be used in one or more embodiments of the invention. In this projection, each 2D image is considered to be a plane perspective projection of a spherical surface using a fixed point of perspective for the projection. The projection of the 2D image to the sphere simply reverses the perspective projection. Multiple images may be projected to the same spherical surface using location and orientation of the camera when each image was captured.

In FIG. 4 2D images 401 and 402 are projected onto the sphere 403. Sphere 403 has center point c 404, and radius R 405. Image 401 was obtained using a camera with a viewer located at point v₁ 406; image 402 was obtained using a camera with a viewer located at point v₂ 410. The orientation of the planes of images 401 and 402 correspond to the orientation of the cameras used to capture those images. Each point on the 2D images 401 and 402 is projected to the sphere along a ray from the camera's viewer. For example, point p 407 is projected onto point q 408 on sphere 403. Since the ray from v₁ through p is parameterized as {v₁+t(p−v₁): t≧0}, point q can be obtained easily by finding the parameter t such that |v₁+t(p−v₁)−c|=R.

FIG. 5 illustrates a spherical projection of the 2D images from FIG. 2. Images are projected onto spherical surface 501. For example, the 2D table image 203 from FIG. 2 appears as image 502 on sphere 501.

FIG. 6 illustrates an unwrapped image obtained from a spherical projection via step 107—unwrap onto plane image. Converting the spherical image to a plane unwrapped image amounts to reversing the projections illustrated in FIG. 4 using a single projection of the sphere onto a plane. Note that the scene illustrated in FIG. 6 is not the same scene illustrated in FIGS. 2 and 4. In this unwrapped image the straight edges of the rug appear as curved lines such as 601. The unwrapped image is a 360 degree panorama; for example the left edge 602 a of the chair corresponds to the right edge 602 b.

FIG. 7 illustrates an embodiment of step 109—dividing the unwrapped image into regions—applied to the unwrapped image of FIG. 6. Each region is indicated by a different color mask. For example, the blue mask 701 defines the rug in the center of the room. The system may enable the user to define masks for regions in the image and accept input for the masks by an operator, for example by implementing software on a computer system specifically for that purpose, or using a combination of methods. For example, the rug 601 in FIG. 6 has a distinct color and pattern that may used to automatically or semi-automatically identify the blue mask region 701 in FIG. 7. The system may thus enable the user to input a foreground distance and background distance for mask region 701 for example. Alternatively, radar or lidar may be obtained and utilized to auto generate depths for portions or the entire image or masks or regions therein.

FIG. 8 illustrates an embodiment of step 111—generating depth information for the points of the regions defined in step 109. In the example shown in FIG. 8, the depth information is encoded as a depth map, with points closer to the viewer shown with darker shades of grey, and points further from the viewer shown with lighter shades of grey. For example, the front edge 801 of the table in the center of the room has a dark shade since it is close to a viewer in or near the center of the room; the wall 802 behind the couch has a lighter shade since it is further from the viewer. Operators may assign depth information to individual pixels, or they may use the region masks to assist in defining depth information by positioning and rotating the regions in three dimensional space. Numerical depth information that is not visible, for example compressed or encoded may also be utilized.

FIG. 9 illustrates an embodiment of step 114—generating stereo images. In this example the unwrapped image from FIG. 6 is combined with the depth map from FIG. 8 to generate left and right eye images, which are superimposed here on the same anaglyph image. This anaglyph image provides a 3D stereoscopic view of the scene when viewed through anaglyph glasses with different color filters in the two lenses. The amount of shift between left eye and right eye images for each pixel is a function of the depth map for that pixel.

Returning to FIG. 1, embodiments of the invention may use various techniques in step 114 to generate the stereo images 115 and 116. As illustrated in FIG. 9, embodiments may use the depth information 112 to shift the display of pixels in left eye images versus right eye images, with closer pixels being shifted a greater amount. FIGS. 1A and 1B illustrate specific techniques that may be used by some embodiments of the invention to perform step 114.

FIG. 1A illustrates a technique wherein step 114 comprises two additional steps 120 and 123. In step 120, the unwrapped image 108 and the depth information 112 are both projected onto a sphere. This process yields spherical image 121 and spherical depth information 122. FIG. 10 illustrates the generation of a spherical depth map, which is an example of spherical depth information 122. Spherical depth information may comprise for example, without limitation, spherical depth maps, spherical bump maps, spherical parallax maps, spherical U maps, spherical UV maps, spherical disparity maps, spherical ST maps, spherical point clouds, spherical z maps, spherical offset maps, spherical displacement maps, or more generally any information that may provide a three-dimensional shape or three-dimensional appearance to a spherical surface. 2D depth map 1001 contains two regions: region 1002 is closer to the viewer (hence shaded darker) and region 1003 is further from the viewer (hence shaded lighter). Depth map 1001 is projected via projection 1004 to the sphere 1005. Regions with greater depth (further from the viewer) are pushed further away from the center of the sphere to form a spherical depth map. Hence spherical region 1006, corresponding to planar region 1002, is closer to the center of sphere 1005 than spherical region 1007, corresponding to planar region 1003.

In addition, in FIG. 1A, spherical image 121 and spherical depth information 122 are used in step 123 to generate left eye image 115 and right eye image 116. FIG. 11 illustrates this process in greater detail. Viewer 1110 is observing a virtual reality scene from a specific position and orientation. The viewer 1110 has a left eye position 1111 and a right eye position 1112. 2D images and a 2D depth map have been projected onto sphere 1005. The image contains black colored region 1101, which is located near the center of the sphere, and speckled region 1102, which is located far from the center of the sphere. The left eye image is formed by projecting points from the sphere onto the left eye plane 1113 a; similarly the right eye image is formed by projecting points from the sphere onto the right eye plane 1114 a. The center point of region 1101 is projected onto point 1115 a in the left eye plane, and onto point 1117 a in the right eye plane. The center point of region 1102 is projected onto point 1116 a in the left eye plane, and onto point 1118 a in the right eye plane. The detailed views of the left eye image 1113 b and of the right eye image 1114 b show that the relative shift of the regions 1101 and 1102 depends on the depth of each region on the spherical depth map: Left eye image 1115 b of region 1101 is offset significantly from right eye image 1117 b of region 1101, whereas left eye image 1116 b of region 1102 is only slightly offset from right eye image 1118 b of region 1102.

FIG. 1B illustrates a different technique for forming left and right eye images that may be used by one or more embodiments of the invention. In comparison to the technique illustrated in FIG. 1A, this technique first forms planar stereo images and then projects these onto left and right spheres. This is an alternative technique to that shown in FIG. 1A, which first projects onto a sphere, and then forms stereo images thereafter. In step 130, the unwrapped planar image 108 is combined with the depth information 112 to form a left unwrapped image 131 and a right unwrapped image 132. Each of the unwrapped images 131 and 132 is then projected onto a sphere, forming a left sphere 135 and a right sphere 136. In the final steps 137 and 138 the spheres 135 and 136 are projected on left eye image 115 and right eye image 116 respectively.

FIG. 12 illustrates an embodiment of the details of steps 130, 133 and 134. Unwrapped planar image 108 contains regions 1202 and 1203. Depth map 112 assigns a depth 1205 to region 1202 and a depth 1206 to region 1203; the darker shading of depth 1206 vs. depth 1205 indicates that object 1203 is closer to the viewer than object 1202. Step 130 combines unwrapped image 108 and depth map 112 to form left unwrapped image 131 and right unwrapped image 132. The left image position 1202 a of object 1202 is offset only slightly from the right position 1202 b of object 1202 based on object 1202's, whereas the left image position 1203 a of object 1203 is offset considerably from the right position 1203 b of object 1203. These offset differences reflect the depth differences of the objects in depth map 112. In step 133 the left unwrapped image 131 is projected onto left sphere 135. Similarly in step 134 the right unwrapped image 132 is projected onto right sphere 136. These spherical projections can be performed as previously described using any suitable plane-to-sphere projection technique. Left planar image 1202 a is projected onto left sphere image 1202 c, and right planar image 1202 b is projected onto right sphere image 1202 d. Similarly left planar image 1203 a is projected onto left sphere image 1203 c, and right planar image 1203 b is projected onto right sphere image 1203 d. Returning to FIG. 1B, the steps 137 and 138 generate left eye image 115 and right eye image 116 from the spherical images 135 and 136 respectively. Any of the previously described techniques or any other known technique for projecting from a sphere to a plane may be used for these steps 137 and 138.

Returning again to FIG. 1, the depth information 112 may be generated by assigning a depth to the points of the regions 110 of the unwrapped image. In one or more embodiments of the invention, one or more portions of the depth information may be generated by defining a flat or curved surface for one or more of the regions, and positioning and orienting these surfaces in three-dimensional space using rotations and translations. The depth information for the points of a region can then be generated automatically using the three-dimensional model of the region surface, simply by picking a view position and calculating the depth of each point as the distance from the view position to the point. Some embodiments may use other techniques for calculating depth from a three-dimensional model, such as using orthogonal projections instead of point projections, or using nonlinear scaling between distance and depth.

FIGS. 13 through 15 illustrate an embodiment of this procedure for positioning and orienting region surfaces or masks. Embodiments of the invention may utilize any and all methods and apparatus described in United States Patent Application entitled “EXTERNAL DEPTH MAP TRANSFORMATION METHOD FOR CONVERSION OF TWO-DIMENSIONAL IMAGES TO STEREOSCOPIC IMAGES”, U.S. Ser. No. 13/874,625, filed 1 May 2013, the specification of which is hereby incorporated herein by reference. In FIG. 13 a 2D image of a human figure is divided into regions. Each region is assigned a distinct color for identification. Region 1301 is one side of the figure's chest; region 1302 is the front of the figure's neck. In FIG. 14 a surface corresponding to each region is positioned and oriented in 3D space. Surface 1401 in FIG. 14 corresponds to region 1301 in FIG. 13, and surface 1402 in FIG. 14 corresponds to region 1302 in FIG. 13. By obtaining depth information from a depth sensor, such as but not limited to radar or lidar for example, the regions 1301 and 1302 may be positioned using the generally noisy depth information as shown in FIG. 14. Surfaces may be flat, or they may be curved surfaces such as for example Bézier surfaces or NURBS surfaces. In some embodiments, each surface may be positioned or adjusted by an operator using 3D editing or compositing tools. In one or more embodiments software may assist in determining approximate positioning and orientation of each surface, or in applying constraints reflecting joints along surface boundaries. This enables the elimination of depth noise in the data to effectively smooth the regions shown in FIG. 14 to have edges that approximate the edges shown in FIG. 13 for example. Specifically, steps 109 or 111 or both in FIGS. 1, 1A and 1B, embodiments of the invention may obtain the generate regions and/or obtain depth information from an external system or sensor, for example separate from, coupled to or combined with a camera or cameras utilized to obtain the 2D images in step 101. The system may auto-generate masks for the regions within a certain tolerance or curve and calculate best fit for the planar or curved mask in step 109. For example, in some embodiments the surfaces of adjacent regions may be constrained to meet exactly or approximately in 3D space along their boundaries. In other embodiments these constraints may be relaxed to simulate spring-like forces between adjacent regions, and software may position regions to minimize the energy associated with these spring-like forces. Various combinations of manual positioning, automatic positioning, and application of hard or soft constraints may be used in different embodiments of the invention. FIG. 15 shows a depth map generated from the 3D positions and orientations of the surfaces in FIG. 14, for example through use of a function to eliminate noise and/or discontinuities in regions or masks, as performed by accepting user input or through use of smoothing algorithms or any combination thereof. Darker pixels indicate points closer to the viewer. Point 1501 in FIG. 15 has a darker shade than point 1502, reflecting the positioning of surface 1401 in FIG. 14 closer to the viewer than surface 1402.

In one or more embodiments of the invention, modifications may be made to the images captured from the scene in order to create a modified 3D virtual reality environment. Such modifications may include additions, deletions, modifications, or any combinations of these changes to the images. Modifications may be made in some embodiments to the original captured 2D images, to the stitched integrated images, to the spherical projection, to the unwrapped plane image, to the depth information, to the stereo images, or to any combinations of these. FIGS. 16 and 17 illustrate an embodiment with modifications made to the unwrapped plane image. FIG. 16 shows an example of a series of 2D images 201 captured from a scene, as is illustrated also in FIG. 2. In this illustrative example, it is desired to make modifications to images 1601, 1603, and 1605. Image 1601 contains equipment 1602 that was put in place to capture the images of the scene, as well as an image of an operator who was capturing the scene; it is desired to remove these items from the virtual reality environment. Image 1603 shows wall 1604 behind the desk; it is desired to add an image of a person in front of this wall in the virtual reality environment. Image 1605 shows a portion of the legs 1606 of the desk, but the 2D images did not capture the entire image of the legs; it is desired to extend these legs to form the complete desk in the virtual reality environment.

Image 17 illustrates an unwrapped image 1701 formed from the images of FIG. 16, with the desired modifications made to the unwrapped image. Equipment 1602 is removed from 1701 at location 1702. Human FIG. 1703 is inserted into empty area 1604. The table legs 1606 are extended to form complete table legs 1704. These modifications may be made using tools and techniques commonly utilized in the art for photo and image compositing. Objects that are inserted or extended require modifications to the unwrapped image, or elsewhere in the processing chain, as well as depth information. In some embodiments the composite image and depth information may be generated in multiple layers, so that multiple objects may exist along a radius from the center of the viewing sphere, but at different depth locations. With multi-layered depth information, a viewer in the virtual reality environment may see certain objects exposed as he changes his view position. This technique provides for automatic gap-filling as pixels in the stereographic images are shifted to provide the 3D view.

The process of creating a 3D virtual environment may be iterative. FIG. 18 illustrates a typical workflow for this iterative process. This workflow is a variant of the embodiment shown in FIG. 1. In FIG. 18, step 111 a (Assign Depth Map to Points of Regions) may comprise two sub-steps: 1801 (Create 3D Model), and 1802 (Render). As previously discussed, creating the 3D model may for example involve mapping images or regions to planes or other surfaces and positioning these planes or surfaces in 3D space. Rendering may for example involve generating spherical or cylindrical projections from these planes and surfaces. After rendering, stereoscopic images 115 and 116 are generated in step 114, as discussed above. In many cases a review step 1803 may be necessary or desirable to ensure that the 3D model created in step 1801 is accurate and meets the requirements of the project. For example, mapping of images onto 3D surfaces may in some cases introduce artifacts that are not apparent until the stereoscopic images 115 and 116 are reviewed. In other cases the images may be free of artifacts, but the depth assigned to regions or objects may not match the desired structure or artistic effects for the virtual reality environment. Therefore, the review 1803 may in many cases lead to additional modifications 1801 to the 3D model. Normally these changes require an additional rendering step 1802, followed by another stereoscopic image generation step 114, and another review 1803. The process may iterate through several loops 1804 before the final 3D model of the virtual reality environment is complete. This iterative process may be time consuming, particularly since the modifications 1801 to the 3D model and the rendering process 1802 may be computationally intensive.

FIG. 19 illustrates an embodiment of the method that shortens the iterative review/update/render process of FIG. 18. In this embodiment the depth information 112 is used directly for updates to the stereoscopic images 115 and 116. Steps 1801 and 1802 are used for the initial 3D model, and possibly for major modifications, but many or all modifications after the initial modeling may be made using the simpler and faster process described below. Depth information 112 is used to generate a spherical translation map 1901. This spherical translation map encodes information that determines the degree of horizontal pixel shifting between the left eye image 115 and the right eye image 116. One or more embodiments may use any desired format for the spherical translation map. A spherical translation map may be, for example, without limitation, a parallax map, a disparity map, a depth map, a U map, a UV map, or any combination of these maps. Any information that determines the amount of pixel translation between left and right images is in keeping with the spirit of the invention.

FIG. 19 illustrates a spherical translation map, since the 3D model is mapped to a sphere in one or more embodiments. One or more embodiments may use other geometries for the virtual environment, such as for example a cylinder or a cube; in these embodiments the spherical translation map would be modified for these geometries. For example, one or more embodiments may use a cylindrical translation map or a cubical translation map instead of or in addition to a spherical translation map.

As illustrated in FIG. 19, in this embodiment after review 1803, any required depth modifications may be performed in step 1902 (Modify Translations), which directly edits the spherical translation map 1901. The modified spherical translation map 1901 is then used directly at input 1903 to modify the left eye image 115 and the right eye image 116. This process may be iterated over multiple loops 1904. Because the steps 1801 and 1802 of creating the 3D model and rendering from this 3D model are not needed, the iterations 1904 may be very rapid and may be viewed in real-time by the editor or team performing the reviews and updates. This real-time review-update cycle may greatly improve the efficiency of the method for creating a 3D virtual environment.

For example, if the spherical translation map 1901 is a parallax map, which encodes the amount of horizontal pixel offset between left eye image 115 and right eye image 116, then modifications to this parallax map may be applied directly and rapidly to the images. Changes in offsets may be applied by shifting pixels in left and right images by the changes in the offsets. Re-rendering from the 3D model is not required. In some cases, modifying the shifts of pixels may generate gaps in the images with missing pixels. Techniques known in the art for gap-filling may be used to generate the missing pixels.

One or more embodiments may use a graphical user interface to perform any of the steps of the method, including for example the step 1902 of modifying the spherical translation map. FIG. 20 shows an illustrative graphical user interface screen 2001 that may be used by one or more embodiments. In this interface, a spherical translation map 2002 is shown with the grayscale of each pixel corresponding to to the amount of translation between left and right images at that pixel location. One or more embodiments may use any spherical translation map that can be used to determine the amount of pixel shifting between left and right images. The translation map 2002 shown in FIG. 20 is the depth map shown in FIG. 8 of the virtual environment shown in FIGS. 6 and 7 and discussed above. This use of a depth map is illustrative; other embodiments of the user interface 2001 may for example use a spherical parallax map or a spherical displacement map. (In general the amount of pixel shifting between left and right images is inversely proportional to depth, as is known in the art.)

User interface screen 2001 includes a list of objects 2003. These objects may for example have been defined during the segmenting of the original stitched image into regions. One or more embodiments may use any desired method to create and modify masks that define objects. The objects 2003 are selectable, with the objects highlighted in gray currently selected. In the illustrative interface a selection boundary is shown in the translation map 2002 for each selected object; for example the boundary 2004 shows the selected rocking chair object.

The user interface provides one or more controls to edit the pixel translations of the selected objects. The illustrative user interface 2001 in FIG. 20 provides three controls: an offset control 2005 that adds or subtracts a fixed number of pixels to the translations for the selected objects; a scaling control 2006 that multiplies the pixel translations by a scaling factor; and a ramp control that applies a gradient to the pixel translations in the x and y directions. These controls are illustrative; one or more embodiments may use any controls and any user interface to support any type of modifications to the spherical translation map. The Apply Changes button 2008 applies the pixel translation modifications to the selected objects and regenerates the left and right images accordingly. In FIG. 20, the offset control 2005 is selected and the offset value 2010 is set to 10 pixels. FIG. 21 shows the effect of this modification. The images in FIG. 21 are anaglyph images with left and right images overlaid using different color filters. The top image 2101 shows a panoramic image prior to the modifications from FIG. 20. The bottom image 2103 shows the panoramic image after applying pixel translation modifications 2102. The couch, rocking chair, and table appear to be pulled further forward in the scene because the left and right pixel shifts for these objects have been increased.

FIG. 22 shows the same graphical user interface screen 2001 as FIG. 20, but scale control 2006 is selected instead of offset control 2005. All objects are selected in list 2003, as shown with boundary 2204 around the entire spherical translation map. The scaling value 2210 is set to 5×, indicating that the pixel translation values of the entire scene should be multiplied by 5. The result of this modification is shown in FIG. 23. The top image 2101 as before shows an anaglyph stereoscopic image of the scene prior to the modifications. After modifications 2302, the image 2303 shows that all objects in the scene appear closer to the viewer.

While the invention herein disclosed has been described by means of specific embodiments and applications thereof, numerous modifications and variations could be made thereto by those skilled in the art without departing from the scope of the invention set forth in the claims. 

What is claimed is:
 1. A method for real-time depth modification of stereo images of a virtual reality environment comprising obtaining or creating a three-dimensional model of a virtual reality environment; generating a spherical translation map from said three-dimensional model, wherein said spherical translation map assigns translation values to points on a spherical surface in said three-dimensional model with a user located at a center of said spherical surface; each of said translation values is a function of a distance of a closest object in said three-dimensional model from said user along a ray between said user and each of said points on said spherical surface; obtaining a pose of said user relative to said virtual reality environment; rendering a left viewpoint image of said three-dimensional model from said pose of said user; rendering a right viewpoint image of said three-dimensional model from said pose of said user; applying one or more translation modifications to said spherical translation map to adjust a depth of one or more objects in said three-dimensional model relative to said user; modifying said left viewpoint image and said right viewpoint image to reflect said translation modifications without re-rendering said left viewpoint image and said right viewpoint image from said three-dimensional model.
 2. The method of claim 1 wherein said spherical translation map is a parallax map that comprises horizontal pixel offset values between a left and right stereoscopic pair of images.
 3. The method of claim 1 wherein said spherical translation map is a depth map.
 4. The method of claim 1 wherein said spherical translation map is a U map or a UV map.
 5. The method of claim 1 wherein both said left viewpoint image and said right viewpoint image are panoramic images.
 6. The method of claim 5 wherein said panoramic images each comprise a 360 degree horizontal field of view.
 7. The method of claim 6 wherein said panoramic images each comprise a 180 degree vertical field of view.
 8. The method of claim 1 wherein said obtaining or creating said three-dimensional model of said virtual reality environment comprises obtaining a plurality of 2D images of said virtual reality environment from at least one camera; stitching together said plurality of 2D images into one or more integrated 2D images of said virtual reality environment; projecting said one or more integrated 2D images onto said spherical surface, yielding a spherical surface image; unwrapping said spherical surface image onto an unwrapped plane image; dividing said unwrapped plane image into a plurality of regions; assigning depth information to the points of each of said plurality of regions to create said three-dimensional model.
 9. The method of claim 7 wherein said assigning depth information to the points of each of said plurality of regions comprises: defining a flat or curved surface for one or more of said plurality of regions; rotating and translating said flat or curved surfaces in three-dimensional space; obtaining said depth information from the three-dimensional position of the points on said flat or curved surfaces.
 10. The method of claim 7, further comprising inserting one or more objects into said unwrapped plane image.
 11. The method of claim 7, further comprising removing one or more objects from said unwrapped plane image.
 12. The method of claim 7, further comprising extending one or more objects appearing in said unwrapped plane image.
 13. The method of claim 7, wherein said dividing said unwrapped plane image into a plurality of regions further comprises accepting mask region inputs to define objects in said plurality of 2D images.
 14. The method of claim 7, further comprising accepting external depth information and applying said external depth information to said plurality of regions.
 15. The method of claim 7, further comprising adjusting said plurality of regions to eliminate depth noise.
 16. The method of claim 7 wherein said obtaining or creating said three-dimensional model of said virtual reality environment further comprises adding one or more computer-generated elements to said three-dimensional model; assigning depth information to each of said one or more computer-generated elements.
 17. The method of claim 1 wherein said obtaining or creating said three-dimensional model of said virtual reality environment comprises obtaining depth information for one or more of said one or more objects from a second user.
 18. The method of claim 1 wherein said obtaining or creating said three-dimensional model of said virtual reality environment comprises accepting external depth information and applying said external depth information to one or more of said one or more objects.
 19. The method of claim 8 wherein said assigning depth information to the points of each of said plurality of regions to create said three-dimensional model comprises assigning said depth information based on underlying image data of one or more of said plurality of 2D images, said one or more integrated 2D images, said spherical surface image, and, said unwrapped plane image.
 20. A system configured to perform real-time depth modification of stereo images of a virtual reality environment comprising at least one computer configured to: obtain or create a three-dimensional model of a virtual reality environment; generate a spherical translation map from said three-dimensional model, wherein said spherical translation map assigns translation values to points on a spherical surface in said three-dimensional model with a user located at a center of said spherical surface; each of said translation values is a function of a distance of a closest object in said three-dimensional model from said user along a ray between said user and each of said points on said spherical surface; obtain a pose of said user relative to said virtual reality environment; render a left viewpoint image of said three-dimensional model from said pose of said user; render a right viewpoint image of said three-dimensional model from said pose of said user; apply one or more translation modifications to said spherical translation map to adjust a depth of one or more objects in said three-dimensional model relative to said user; modify said left viewpoint image and said right viewpoint image to reflect said translation modifications without re-rendering said left viewpoint image and said right viewpoint image from said three-dimensional model. 